package com.appleyk.repository;

import com.appleyk.node.Tuser;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.GraphRepository;

import org.springframework.stereotype.Repository;

/**
 * 用户的持久层
 *  继承GraphRepository  里面有添加的方法
 *
 */
@Repository
public interface TuserRepository extends GraphRepository<Tuser> {


    /**
     * 修改 用户介绍的用户  填写后看有修改的 评价
     * @param uid 介绍的用户ID
     * @param pinjia 评价
     * @return
     */
    @Query("MATCH (r:Tuser) WHERE r.uid ={0} SET r.pijia ={1} return r")
    Tuser setTuser(Long uid,String pinjia);



}
